package com.server.http.handler.domain;

import com.server.conditionenum.HttpReturnStatus;

public class ReturnEntity {
	int status;
	int type;//HTTP请求的类型
	Object data;// 返回数据

	public static ReturnEntity HttpReturn(Object data,int type,HttpReturnStatus httpReturnStatus){
		ReturnEntity entity = new ReturnEntity();
		entity.setStatus(httpReturnStatus.ordinal());
		entity.setData(data);
		entity.setHttpProtocol(type);
		return entity;
	}
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
	public void setHttpProtocol(int type) {
		this.type = type;
	}
	
	public int getHttpProtocol() {
		return type;
	}
}
